<script>
	export default {
		onLaunch: async function() {
			console.log('onLaunch...');
			//获取token
			try{
				
				await this.$ajax('user/init', '', 'get').then(res => {
					uni.setStorageSync('token', res.data.obj.token)
				})
				await this.$ajax('sys/getClientConfigs', '', 'get').then(res => {
					this.$store.commit('setConfig', res.data.obj)
				})
				
			}catch(e){
				//TODO handle the exception
			}
			// #ifdef APP-PLUS
			if (plus) {
				plus.screen.lockOrientation("portrait-primary");
			}
			// #endif
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("./static/css/icon-font.css");
	@import url("./static/css/flex.css");
	view,text,input{
		box-sizing: border-box;
		font-family:PingFang;
	}
	.refresh{
		background: #EDEDED !important;
	}
	::-webkit-scrollbar{
	    display:none;
	}
	uni-page-body{
		height: 100% !important;
	}
	.status_bar{
		height: var(--status-bar-height);
	}
	.status_bar_bak{
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 2;
		background: #fff;
	}
</style>
